<template>
<div class="box">
    <div>
    <van-search
      class="info_search input_text"
      v-model="value"
      @search="onSearch"
      @clear="clearSearch"
      placeholder="搜索"
    />
    <van-list
      :finished="myFinished"
      v-model="myLoading"
      finished-text="没有更多了"
    >
    <van-cell
        class="card"
        v-for="(item, index) in myList"
        :key="index"
      >
        <div>
          <div>
            <div class="title">
              <div>{{ item.ReportName }}</div>
            </div>
            <van-row gutter="20">
              <van-col>
                <img  class="icon"
                  src="@/assets/Images/AppIcon/icon_list_contract_number.png"
                />当前编号：{{ item.Num }}
              </van-col>
            </van-row>
            <van-row gutter="20">
              <van-col>
                <img  class="icon"
                  src="@/assets/Images/AppIcon/icon_list_user.png"
                />被检查企业：{{ item.EnterpriseName }}
              </van-col>
            </van-row>
           <van-row gutter="20">
              <van-col>
                <img  class="icon"
                  src="@/assets/Images/AppIcon/icon_list_date.png"
                />年份：{{ item.Year }}
              </van-col>
            </van-row>
            <van-row gutter="20">
              <van-col>
                <img  class="icon"
                  src="@/assets/Images/AppIcon/icon_list_task.png"
                />报告模板：{{ item.TemplateName }}
              </van-col>
            </van-row>
        </div>
        </div>
      </van-cell>
    </van-list>
  </div>
</div>
</template>

<script>
import { Toast, Form } from 'vant'
import {qyHistoryList } from '@/api/qy'
var wait = 60
export default {
  data() {
    return {
      value: "",
      myList: [],
      myFilter: {
        page: 0,
        dataType: "List",
      },
      loading: false,
      finished: false,
      myLoading: false,
      myFinished: false,
    };
  },
  created() {
     this.getMyList();
  },
  methods: {
    onSearch() {
      var conditions1 = [];
      if (this.value) {
        conditions1.push({
          Name: "Keywords",
          DisplayName: this.value,
          Value: this.value,
          Operator: "like",
          DataType: "String",
        });
      }
      this.myFilter.page = 0;
      this.myFilter.conditions = JSON.stringify(conditions1);
      this.getMyList();
    },
    clearSearch() {
      this.myFilter = {
        page: 0,
        dataType: "List",
      };
      this.value = "";
      this.getMyList();
    },
    getMyList(){
      this.myLoading = true;
      qyHistoryList(this.myFilter).then((res) => {
        this.myLoading = false;
        if (!res.data.HasNextPage) {
          this.myFinished = true;
        }
        this.myList = res.data.Data;
        this.myFilter.page = res.data.PageIndex;
      });
    },
  },
}
</script>

<style lang="less" scoped>
.register-form {
}
.phone {
	position: relative;
	.code {
		position: absolute;
		right: 20px;
		top: 20px;
		font-size: 12px;
	}
}
.register-info {
	background-color: #e8f1f8;
	padding-bottom: 20px;
}
.img-box {
  height: 50px;
  width: 50px;
  padding: 10px;
  position: absolute;
  left: 50%;
  top: 60px;
  background-color: #fff;
  border-radius: 50%;
  overflow: hidden;
}
.popup-title
{
      line-height: 35px;
    padding: 10px;
    font-size: 15px;
    padding-left: 20px;
}

.op_btn {
  display: flex;
  justify-content: flex-end;
  .btn_item {
    display: flex;
    align-items: center;
    img {
      height: 15px;
      width: 15px;
      margin-right: 5px;
    }
  }
}
</style>